package com.rabbit.produce.controller;

import com.rabbit.produce.entrty.User;
import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

import java.util.Date;

@Controller
public class HelloSender {
 
    @Autowired
    private AmqpTemplate rabbitTemplate;
 
    public void send(User user) {
        this.rabbitTemplate.convertAndSend("hello", user);
    }

}
